import BaseModule from '../BaseModule';
import componentCol from './index';
import {demoServer} from '@/api/installServer';

export default class Module extends BaseModule {


    constructor(opts: any) {
        super(opts);
        this.componentClazzes = componentCol;
    }
    /**
     * 创建组件
     * @param opts {Object}
     */
    public createComponents(opts: any) {
        const components: any = componentCol;
        // 示例
        const demoComponent = new components.DemoComponent({
            map: this.options.map,
            symbolConfig: this.options.symbolConfig,
            simpleRenderMgr: this.options.GISComponents.simpleRenderMgr,
            PointGeometryBuilder: this.options.GISComponents.PointGeometryBuilder,
            popupManager: this.options.GISComponents.popupManager,
            featureLocate: this.options.GISComponents.featureLocate,
            featureHighlight: this.options.GISComponents.featureHighlight,
            service: demoServer,
        });
        this.components.demo = demoComponent;
    }
}
